import qs from 'qs'
import { request } from '@/utils/httpUtil'

import { ResultType } from '@/types/result'

const BASE_API = import.meta.env.VITE_MOCK_API

enum Api {
  file = '/list',
  INFO = '/info',
  SAVE_OR_UPDATE = '/saveOrUpdate',
  REMOVE = '/remove',
}

/**
 * 查询列表
 * @param modelName 模型名称
 * @param param
 * @returns
 */
import graphView from '@/json/graphView.json'
export async function modelGraphApi(): Promise<ResultType> {
  return new Promise((resolve, reject) => {
    const result = {
      code: 200,
      // data: json,
      data: graphView,
      message: '请求成功',
    }
    resolve(result)
  })
  // return request({
  //   url: BASE_API + `/${modelName}` +  Api.LIST + '?' + qs.stringify(param),
  //   method: 'GET',
  //   headers: { 'content-type': 'application/x-www-form-urlencoded' }
  // })
}
